﻿@using WSCeCommerceWeb.Helpers

@{
     Syrinx2.MvcMenu menu = new Syrinx2.MvcMenu("defaultMainMenu", (val) => Url.Content(val))
    {
        PrimaryCssClass = "syrinx-menu",
        CssClass = "MainMenu",
        SubMenuCssClass = "MainMenuSubMenu",
        ItemCssClass = "MainMenuItem",
        SubMenuItemCssClass = "MainMenuSubMenuItem",
        Id="menu"
    };
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title - My ASP.NET MVC Application</title>
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width" />
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
</head>
<body>
    <header>
        <div class="content-wrapper">
            <div class="float-left">
                <p class="site-title">@Html.ActionLink("Williams Specialty Corporation", "Index", "Home")</p>

            </div>
            <div class="float-right">
                <section id="login">
                    @Html.Partial("_LoginPartial")
                </section>
                <nav class="float-right">
                    @Html.Raw(menu.Html)
                   
                </nav> @Html.Partial("_Search")
            </div>
        </div>
    </header>
    <div id="body">
        @RenderSection("featured", required: false)
        <section class="content-wrapper main-content clear-fix">
            @RenderBody()
        </section>
    </div>
    <footer>
        <div class="content-wrapper">
            <div class="float-left">
            </div>
        </div>
    </footer>
 
    @Scripts.Render("~/bundles/jquery", "~/bundles/syrinxmenu")
    @Scripts.Render("~/bundles/jquery")
    @RenderSection("scripts", required: false)

    <script src="~/Scripts/WSCeCommerceWeb.js" ></script>

    <script>
            @if (!SecurityHelper.AlllowManage())
              {
                  @* Remove the admin menu if the user is not in the admn role *@
                    <text>$("#mnuAdmin").hide();</text>
              }

       // $("#mnuShoppingCart").hide();
       // $("#mnuCheckOut").hide();

           $(document).ready(function () {
               $.ajaxSetup({
                   cache: false,
                   error: function (x, e) {
                       if (x.status == 0) {
                           alert('You are offline!!\n Please Check Your Network.');
                       } else if (x.status == 404) {
                           alert('Requested URL not found.');
                       } else if (x.status == 500) {
                           alert('Internal Server Error.');
                       } else if (e == 'parsererror') {
                           alert('Error.\nParsing JSON Request failed.');
                       } else if (e == 'timeout') {
                           alert('Request Time out.');
                       } else {
                           alert('Unknown Error.\n' + x.responseText);
                       }
                   }
               });
           });
       
    </script>
</body>
</html>
